The present invention relates to computer systems and, more specifically, to extending the attributes of an application generated using a fourth generation programming tool.
While computers themselves have automated many tasks that had previously been performed manually, it has only been fairly recently that the task of programming the computer has achieved some level of automation. Early computer programming languages required the programmer to manually enter all of the code of an application, usually by typing source code in a text file. While such manual code entry was tedious and error prone, it did have the advantage that virtually all aspects of the resulting applications were entirely under the control of the programmer. Programmers could modify their programs however they saw fit by simply modifying the underlying code.
Over time, techniques have been developed to automate the creation of applications. In particular, tools have been developed to allow users to design applications, and to automatically generate code that implements those applications, simply by interacting with user interface controls. Such tools are generally referred to as fourth generation (4GL) programming tools.
For example, a 4GL programming tool may present an application designer with a window that represents the interface that the to-be-generated application will display to its users. The 4GL programming tool may further present the application designer with user interface design tools that allow the application designer to visually xe2x80x9cpaintxe2x80x9d standard user interface components onto the window. For example, the user interface design tools may allow the application designer to place check boxes, menus, dialog boxes, list boxes, and buttons onto the window, and allow the application designer to specify what should happen when the user interacts with those components.
The user may view a xe2x80x9cproperty palettexe2x80x9d for each user interface component that the user has placed on the window. The property palette lists the properties of the user interface component that can be specified by the user, and the current value of those properties. For example, a property for a button component may be xe2x80x9clabelxe2x80x9d, where the value assigned to the label property is the text that is displayed on the button.
Once the application designer has finished designing the application, the 4GL programming tool automatically generates code for the application. The form of the code thus generated may vary from implementation to implementation. For example, the 4GL programming tool may generate machine-executable code, source code, and/or metadata. For the purpose of explanation, the term xe2x80x9capplication codexe2x80x9d shall be used herein to refer to the data generated by a 4GL programming tool to specify the applications designed using the 4GL programming tool, regardless of the form of that data.
Frequently, the 4GL programming tool is used to generate application code that is not directly executable by a computer, but which, when executed by a particular runtime engine, implements the application that was designed using the 4GL programming tool. For example, the runtime engine reads the application code generated by the 4GL programming tool, and xe2x80x9cexecutesxe2x80x9d the application code by displaying the window previously designed by the application designer, along with all of the user interface components that were added to the window by the application designer. When the user interacts with those user interface components, the application performs the actions that the application programmer assigned to those components using the 4GL programming tool.
4GL programming tools make designing applications far easier and faster, and less error prone, than manual coding techniques. However, the ease and speed gained by 4GL programming is not without its price. In particular, the virtually unrestrained flexibility and control provided by manual coding is lost. Instead, the 4GL programming tool user is typically presented with a xe2x80x9ccannedxe2x80x9d set of standard user-interface components. The code that actually implements those components is typically contained in a compiled library that is distributed with the 4GL programming tool, and are thus generally inaccessible to the user. Consequently, the user is limited to (1) the set of components offered by the 4GL programming tool, (2) the properties provided by those components, and (3) the functions performed by the methods provided for those components. Even slight deviations from the norm, such as presenting an oval button instead of a rectangular button, are not possible if the components provided by the 4GL programming tool do not have user-settable properties that allow the deviations. For example, for a 4GL programmer to use oval buttons, the button component provided by the 4GL programming tool would have to provide a xe2x80x9cshapexe2x80x9d property that may be changed from xe2x80x9crectanglexe2x80x9d to xe2x80x9covalxe2x80x9d. If the button component does not have a xe2x80x9cshapexe2x80x9d property, or if xe2x80x9covalxe2x80x9d is not a value supported for the shape property, then the user cannot design applications that have oval buttons.
The attributes and behaviors of the user interface (UI) and software components that a 4GL programmer may incorporate in an application are implemented in object classes supplied in a library that is provided with the 4GL programming tool. The library is typically supplied in compiled form, so that it is not editable. When the user designs an application that uses a button, for example, the 4GL programming tool generates code which, when executed by the runtime engine, results in calls being made to methods within the xe2x80x9cbuttonxe2x80x9d class in the library provided with the 4GL programming tool. If the xe2x80x9cdisplayxe2x80x9d method of the button class is designed to display a rectangular button, then a rectangular button will be displayed, even if the designer would prefer an oval button.
Based on the foregoing, it is clearly desirable to provide a method and system that allows applications to be designed easily and quickly using 4GL programming tools, but which allows greater flexibility than current 4GL programming tools. In particular, it is desirable to provide a 4GL programming tool that does not restrict users to only those implementations of components that are supplied with the 4GL programming tool.
According to one aspect of the invention, a 4GL programming tool is provided that allows application designers to specify the implementation classes of the components that are used in the applications that they design using the 4GL programming tool. The implementation classes thus specified may define attributes and behaviors not supported by the corresponding component implementations provided with the 4GL programming tool. During runtime, methods in the specified implementation classes are invoked. To correctly invoke the methods of user-specified implementation classes, the interfaces of the methods must be known to the entity performing the invocations. Therefore, according to one aspect of the invention, all component implementations that are to be used by the application, including both the xe2x80x9cstandardxe2x80x9d component implementations provided with the 4GL programming tool and the xe2x80x9ccustomxe2x80x9d component implementations specified by the application designer, implement a common interface.